#include<bits/stdc++.h>

using namespace std;

long long a,b;

#define yes puts("Yes")
#define no puts("No")

int main (){
	cin >> a>>b;
	if(b + 1 == a) {
		yes;
		return 0;
	}
	for(long long i = 1;i * i <= b;i++){
		if(b % i == 0){
			long long x = b/i;
			if(x + i == a) {
				yes;
				return 0;
			}
		}
	}
	no;
	return 0;
}
